﻿@{
    Layout = "~/Areas/UserOp/Views/Shared/_Layout.cshtml";
}

@using Modules.Enums
@using Modules.Database
@model TestPaper

<link href="~/css/style.css" rel="stylesheet" />
<div class="h60"></div>
<div>
    <h3 style="text-align: center; margin-top: 1em; margin-bottom: 1em; font-size:20px;">问卷分析</h3>
</div>
<div class="container">
    <h3 style="margin-left:-2em;">问卷名:@Model.Title </h3>
    <h4>( 说明:@Model.Description )</h4>
    @{
        var count = 0;
        foreach (var item in Model.Questions)
        {
            count += 1;
            <div class="wellTitle">
                <p>@count:@item.Title @*@(item.MustAnswer == (int)EnumMustAnswer.MustAnswer ? "(必答)" : ""*@)</p>
                <p class="later">
                    @if (item.QuestionType == (int)EnumQuestionType.Radioselect)
                    {
                        foreach (var selectitem in item.SelectItems)
                        {
                            <span> @selectitem.ItemContent (@selectitem.Choices.Count') </span>
                        }
                    }
                    else if (item.QuestionType == (int)EnumQuestionType.Multiselect)
                    {
                        foreach (var selectitem in item.SelectItems)
                        {
                            <span> @selectitem.ItemContent (@selectitem.Choices.Count') </span>
                        }
                    }
                    else
                    {
                        <a class="a_btn_sm" href="~/UserOp/UAnalysis/AnswerDetail?questionid=@item.Id">查看所有回答</a>
                    }
                </p>
            </div>
        }
    }
</div>
<style>
    .container {
        margin-top: 20px;
        margin-left:40px;
    }
        .container h3 {
            font-size: 20px;
            color:#0026ff;
            margin: 10px 10px;
        }
        .container h4 {
            font-size: 18px;
            color:#0094ff;
            margin: 10px 10px;
        }

    .later span {
        margin-left:1em;
    }

    .later a {
        margin-top:10px;
    }

    .a_btn_sm {
        -moz-user-select: none;
        background-image: none;
        border: 1px solid transparent;
        border-radius: 4px;
        cursor: pointer;
        display: inline-block;
        font-size: 14px;
        font-weight: normal;
        line-height: 1.42857;
        margin-bottom: 0;
        padding: 6px 12px;
        text-align: center;
        vertical-align: middle;
        white-space: nowrap;
        background-color: #f0ad4e;
        border-color: #eea236;
        color: #fff;
        border-radius: 3px;
        font-size: 12px;
        line-height: 1.5;
        padding: 5px 10px;
    }
</style>

@section Scripts{
    <script type="text/javascript">
        LeftMenuSelect(0);
    </script>
}
